-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Enhance RISCV machine outlining to support a tailcall strategy. #117526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is modeled on the equivalent path in the AArch64 backend. Whenever the outlining candidate ends in a terminator, we can use a tail call to reach it, removing the need to use a link register or to insert a return instruction in the outlined function. This improves code size in a size-optimized build of an internal benchmark by approximately 3%.
|
@llvm/pr-subscribers-backend-risc-v Author: Owen Anderson (resistor) ChangesThis is modeled on the equivalent path in the AArch64 backend. This improves code size in a size-optimized build of an internal Patch is 26.69 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/117526.diff 7 Files Affected:
|
|
#115297 is already an attempt to do this. Putting this here in case you were not aware of it. |
No, I wasn't aware. Thank you for pointing it out. |
This is modeled on the equivalent path in the AArch64 backend.
Whenever the outlining candidate ends in a terminator, we can use
a tail call to reach it, removing the need to use a link register
or to insert a return instruction in the outlined function.
This improves code size in a size-optimized build of an internal
benchmark by approximately 3%.